package routes

import (
	"huanteng/core"
	"huanteng/vendors/paginate"
	"huanteng/web/controllers/admin"
	"huanteng/web/middleware"
	"huanteng/web/services"

	//paginate "gitee.com/ostaer/iris-pagination"
)



func init()  {
	//pagination:= paginate.New(&paginate.CustomeParser{})
    a:=core.Party("/admin/")

	a.Post("/auth/login",admin.Login)
    core.Middleware(middleware.JwtVerifierMiddleware(),middleware.JwtVerify("admins"),paginate.New(),middleware.CheckCasbin)
	//core.Middleware(paginate.New())
	core.Register("/auth",new(admin.AuthController),new(services.MenuService))
	core.Register("/home",new(admin.HomeController))
	core.Register("/admin",new(admin.AdminsController),new(services.AdminService))
	core.Register("/role",new(admin.RoleController),new(services.RoleService))
	core.Register("/menu",new(admin.MenuController),new(services.MenuService))

}
